home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
comm2
/
rmvnwsgr.lha
/
RemoveNewsGroup
/
AddNewsGroup
next >
Wrap
AmigaDOS Script File
|
1995-09-01
|
1KB
|
52 lines
.key Group/A,DaysToKeep
.bra [
.ket ]
.def DaysToKeep 1
if val [DaysToKeep] NOT GE 0
echo "DaysToKeep must be greater than or equal to zero"
quit
endif
;; Written by James Burton (burton@cs.latrobe.edu.au)
;; for PostNewsSpool.lha
;; 08-Jan-95
;; Fixed up a *whole bunch* by Jim McKinney - 27-Aug-95
set ActiveFile UULIB:News/Active
set PurgeFile UULIB:News/PurgeFile
set TempFile T:Temp.$$
cd UULIB:News
amitcp:bin/newgroup $ActiveFile [Group]
echo >>$PurgeFile "[Group] [DaysToKeep]"
echo "Added [Group] to $PurgeFile."
echo "Keeping posts for [DaysToKeep] day" NOLINE
if val [DaysToKeep] GT 1
echo "s."
else
echo "."
endif
sort $ActiveFile $TempFile
delete >nil: $ActiveFile
copy $TempFile $ActiveFile
delete >nil: $TempFile
sort $PurgeFile $TempFile
delete >nil: $PurgeFile
copy $TempFile $PurgeFile
delete >nil: $TempFile
;This section is for tin and the .newsrc file. Take it out if you're not using it.
set NewsRC UULIB:.newsrc
echo >>$NewsRC "[Group]: "
echo "Added [Group] to $NewsRC"
sort $NewsRC $TempFile
delete >nil: $NewsRC
copy $TempFile $NewsRC
delete >nil: $TempFile
;; End of File